<%@ page import="com.Blog" %>
<%@ page import="java.util.List" %>
<%@ page import="com.Page" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<html>
<head>

</head>
<body>
<table border="1">
<%--<%
    List<Blog> blogList = (List<Blog>)request.getAttribute("blogList");
    for (int i = 0; i < blogList.size(); i++) {
        Blog blog = blogList.get(i);
        %>
    <tr>
        <td><%=blog.getId()%></td>
        <td><%=blog.getContent()%></td>
        <td><%=blog.getPublishtime()%></td>
        <td><%=blog.getUserid()%></td>
    </tr>
<%
    }

%>--%>
    <%
        Page<Blog> blogPage = (Page<Blog>)request.getAttribute("blogPage");
    %>
    ########
    <%=blogPage%>
    ########
    <table>
    <%
        List<Blog> objList = blogPage.getObjList();
        for (int i = 0; i < objList.size(); i++) {
            Blog blog = objList.get(i);
            %>
    <tr>
        <td><%=blog.getId()%></td>
        <td><%=blog.getContent()%></td>
    </tr>
    <%
        }
    %>
    </table>
    <div class="pageInfo">
        总共:<%=blogPage.getCount()%>,总页数：<%=blogPage.getTotalPage()%><br/>
        <%
            for (int i = 1; i <= blogPage.getTotalPage(); i++) {
                %>
                    <a href="blogList?current=<%=i%>" ><%= i %></a>
                <%
            }
        %>
    </div>

</body>
</html>